package com.example.basic.web.model.log;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.basic.base.IdEntity;
import com.example.basic.base.event.PreCreateEventEntity;
import com.example.basic.base.event.PreUpdateEventEntity;
import com.example.basic.utils.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 * <p>
 * 系统操作日志表
 * </p>
 *
 * @author sunyp
 * @since 2023-09-06
 */
@TableName("sys_oper_log")
@ApiModel(value="OperLog对象", description="系统操作日志表")
public class OperLog extends IdEntity implements PreCreateEventEntity, PreUpdateEventEntity {

    @ApiModelProperty(value = "主键ID")
    @TableId("id")
    private String id;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_at", fill = FieldFill.INSERT)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date createAt;

    @ApiModelProperty(value = "创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_at", fill = FieldFill.UPDATE)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date updateAt;

    @ApiModelProperty(value = "修改人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "接口功能描述")
    @TableField("description")
    private String description;

    @ApiModelProperty(value = "错误描述")
    @TableField("error_msg")
    private String errorMsg;

    @ApiModelProperty(value = "返回参数")
    @TableField("json_result")
    private String jsonResult;

    @ApiModelProperty(value = "方法名称")
    @TableField("method")
    private String method;

    @ApiModelProperty(value = "操作地点")
    @TableField("operation_location")
    private String operationLocation;

    @ApiModelProperty(value = "操作人员名称")
    @TableField("operator_name")
    private String operatorName;

    @ApiModelProperty(value = "请求参数")
    @TableField("operator_param")
    private String operatorParam;

    @ApiModelProperty(value = "主机地址")
    @TableField("request_ip")
    private String requestIp;

    @ApiModelProperty(value = "请求方式")
    @TableField("request_method")
    private String requestMethod;

    @ApiModelProperty(value = "请求URL")
    @TableField("request_url")
    private String requestUrl;

    @ApiModelProperty(value = "操作状态")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "模块标题")
    @TableField("title")
    private String title;

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    @Override
    public Date getCreateAt() {
        return createAt;
    }

    @Override
    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    @Override
    public String getCreateBy() {
        return createBy;
    }

    @Override
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Override
    public Date getUpdateAt() {
        return updateAt;
    }

    @Override
    public void setUpdateAt(Date updateAt) {
        this.updateAt = updateAt;
    }

    @Override
    public String getUpdateBy() {
        return updateBy;
    }

    @Override
    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public String getJsonResult() {
        return jsonResult;
    }

    public void setJsonResult(String jsonResult) {
        this.jsonResult = jsonResult;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getOperationLocation() {
        return operationLocation;
    }

    public void setOperationLocation(String operationLocation) {
        this.operationLocation = operationLocation;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    public String getOperatorParam() {
        return operatorParam;
    }

    public void setOperatorParam(String operatorParam) {
        this.operatorParam = operatorParam;
    }

    public String getRequestIp() {
        return requestIp;
    }

    public void setRequestIp(String requestIp) {
        this.requestIp = requestIp;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getRequestUrl() {
        return requestUrl;
    }

    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}